SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [dbo].[vwactadesignacionold]
AS
SELECT     dbo.tb_Vacantes.idVacante, dbo.tb_Plazas.CUPOF, dbo.tb_Agentes.Nombres, dbo.tb_Agentes.Documento, 
                      dbo.vwrTiposDeDocumento.Descripcion AS TipoDeDocumento, dbo.tb_Vacantes.PuntajeDesignacion, dbo.tb_Vacantes.OrdenDesignacion, 
                      dbo.vwrTurnos.Descripcion AS Turno, dbo.vwrSuborganizaciones.Nivel, dbo.vwrSuborganizaciones.Categoria, dbo.vwrSuborganizaciones.Zona, 
                      dbo.vwrLocalidades.Descripcion AS Localidad, dbo.vwrConcursos.Descripcion AS Concurso, dbo.vwrCargosGenericos.Descripcion AS CargoGenerico, 
                      dbo.vwrConcursos.Convocatoria, dbo.vwrTitulos.Descripcion AS Titulo, dbo.vwrOrganizacionesSF.Nombre AS Organizacion
FROM         dbo.vwrTurnos RIGHT OUTER JOIN
                      dbo.vwrCargosGenericos RIGHT OUTER JOIN
                      dbo.vwrOrganizacionesSF RIGHT OUTER JOIN
                      dbo.vwrTitulos INNER JOIN
                      dbo.tb_TitulosDelAgente INNER JOIN
                      dbo.vwrTiposDeDocumento INNER JOIN
                      dbo.tb_Agentes ON dbo.vwrTiposDeDocumento.ID = dbo.tb_Agentes.TipoDocumento ON dbo.tb_TitulosDelAgente.Agente = dbo.tb_Agentes.idAgente ON 
                      dbo.vwrTitulos.ID = dbo.tb_TitulosDelAgente.Titulo INNER JOIN
                      dbo.vwrLocalidades INNER JOIN
                      dbo.tb_InscripcionesConvocatorias ON dbo.vwrLocalidades.ID = dbo.tb_InscripcionesConvocatorias.Localidad INNER JOIN
                      dbo.vwrConcursos ON dbo.tb_InscripcionesConvocatorias.Convocatoria = dbo.vwrConcursos.idconvocatoria ON 
                      dbo.tb_TitulosDelAgente.Titulo = dbo.tb_InscripcionesConvocatorias.TituloValorado AND 
                      dbo.tb_Agentes.idAgente = dbo.tb_InscripcionesConvocatorias.Agente INNER JOIN
                      dbo.tb_TraslacionDeCYA INNER JOIN
                      dbo.tb_Plazas ON dbo.tb_TraslacionDeCYA.Cargo = dbo.tb_Plazas.CargoSalarialDefault AND 
                      dbo.tb_TraslacionDeCYA.Asignatura = dbo.tb_Plazas.Asignatura INNER JOIN
                      dbo.tb_Vacantes ON dbo.tb_Plazas.idPlaza = dbo.tb_Vacantes.Plaza ON dbo.tb_Agentes.idAgente = dbo.tb_Vacantes.AgenteDesignado AND 
                      dbo.vwrConcursos.id = dbo.tb_Vacantes.Concurso AND dbo.vwrLocalidades.ID = dbo.tb_Vacantes.Localidad AND 
                      dbo.tb_InscripcionesConvocatorias.CargoGenerico = dbo.tb_TraslacionDeCYA.CargoGenerico AND 
                      dbo.tb_InscripcionesConvocatorias.AsignaturaGenerica = dbo.tb_TraslacionDeCYA.AsignaturaGenerica ON 
                      dbo.vwrOrganizacionesSF.ID = dbo.tb_Plazas.Organizacion ON dbo.vwrCargosGenericos.ID = dbo.tb_TraslacionDeCYA.CargoGenerico ON 
                      dbo.vwrTurnos.ID = dbo.tb_Plazas.Turno LEFT OUTER JOIN
                      dbo.vwrSuborganizaciones ON dbo.tb_Plazas.SubOrganizacion = dbo.vwrSuborganizaciones.ID
GO
GRANT SELECT ON  [dbo].[vwactadesignacionold] TO [CentroDeDesignaciones]
GRANT SELECT ON  [dbo].[vwactadesignacionold] TO [Juntas]
GRANT SELECT ON  [dbo].[vwactadesignacionold] TO [SoloVer]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -631
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_Plazas"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 268
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrOrganizacionesSF"
            Begin Extent = 
               Top = 114
               Left = 38
               Bottom = 222
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrConcursos"
            Begin Extent = 
               Top = 38
               Left = 616
               Bottom = 262
               Right = 805
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_InscripcionesConvocatorias"
            Begin Extent = 
               Top = 142
               Left = 1006
               Bottom = 344
               Right = 1209
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrLocalidades"
            Begin Extent = 
               Top = 271
               Left = 364
               Bottom = 364
               Right = 553
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrTitulos"
            Begin Extent = 
               Top = 372
               Left = 829
               Bottom = 450
               Right = 1018
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_TitulosDelAgente"
            Begin Extent = 
               Top = 281
               Left = 33
               Bottom = 389
      ', 'USER', N'dbo', 'VIEW', N'vwactadesignacionold', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'         Right = 238
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrTiposDeDocumento"
            Begin Extent = 
               Top = 459
               Left = 668
               Bottom = 537
               Right = 857
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Agentes"
            Begin Extent = 
               Top = 673
               Left = 897
               Bottom = 781
               Right = 1098
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_TraslacionDeCYA"
            Begin Extent = 
               Top = 515
               Left = 965
               Bottom = 623
               Right = 1154
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrCargosGenericos"
            Begin Extent = 
               Top = 546
               Left = 38
               Bottom = 654
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrTurnos"
            Begin Extent = 
               Top = 527
               Left = 317
               Bottom = 620
               Right = 506
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Vacantes"
            Begin Extent = 
               Top = 715
               Left = 62
               Bottom = 953
               Right = 265
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrSuborganizaciones"
            Begin Extent = 
               Top = 828
               Left = 614
               Bottom = 1064
               Right = 803
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
      Begin ColumnWidths = 18
         Width = 284
         Width = 1440
         Width = 2085
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 2880
         Width = 5085
         Width = 1440
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwactadesignacionold', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwactadesignacionold', NULL, NULL
GO
